package com.kabuda.zhugehot200_review;

/**
 * @author kabuda
 * @date 2025-03-29 19:24
 * @description
 */
public class 最长连续递增序列 {
    public static void main(String[] args) {
        System.out.println(findLengthOfLCIS(new int[]{1, 3, 5, 4, 7}));
    }


    public static int findLengthOfLCIS(int[] nums) {
        int max = 1;
        int start = 0;
        for (int i = 1; i < nums.length; i++) {
            if (nums[i] <= nums[i - 1]) {
                start = i;
            }
            max = Math.max(max, i - start + 1);
        }
        return max;
    }
}
